<?php
/**
 * This is the model class for table "store".
 * The followings are the available columns in table 'posts':
 * @property integer $product_id
 * @property varchar $name
 * @property integer $price
 */
class Product extends CActiveRecord{
    /**
     * Returns the static model of the specified AR class.
     * @param string $className active record class name.
     * @return Post the static model class
     */
    public static function model($className = __CLASS__) {
        return parent::model($className);
    }
    public function tableName(){
        return "{{product}}";
    }
    /**
     * @return array relational rules.
     */
    public function relations() {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array(
            'store_product' => array(self::HAS_MANY, 'StoreProduct', 'product_id')            
        );
    }     
}
